// https://vitepress.dev/guide/custom-theme
import {onMounted} from 'vue'
import type {Theme} from 'vitepress'
import DefaultTheme from 'vitepress/theme'
import './style.css'



// @ts-ignore
// import Layout from './Layout.vue';

export default {
    extends: DefaultTheme,
    // Layout: () => {
    //   return h(Layout, null, {
    //     // https://vitepress.dev/guide/extending-default-theme#layout-slots
    //   })
    // },
    enhanceApp({app, router, siteData}) {
        // ...
        // app.component("list", Layout)  // 全局注册自定义布局组件

        console.log(app)


        //
        onMounted(() => {

            // const element = document.getElementById("app");
            // const canvasNest: any = new CanvasNest(element, {color: '255,0,0', count: 99});

            // const instance = getCurrentInstance();
            // instance.refs.


            // canvasNest.distory()
        })

    }
} satisfies Theme
